﻿using System.Windows;

namespace OurMind.Controls
{
    public partial class MindPanel
    {
        #region id


        ///<summary>获得 Id</summary>
        public static int GetID(DependencyObject obj) { return (int)obj.GetValue(IDProperty); }

        ///<summary>设置 Id</summary>
        public static void SetID(DependencyObject obj, int value) { obj.SetValue(IDProperty, value); }

        public static readonly DependencyProperty IDProperty = DependencyProperty.RegisterAttached("ID", typeof(int), typeof(MindPanel), new PropertyMetadata(0) { PropertyChangedCallback = IDPropertyChanged });

        private static void IDPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {

        }


        #endregion

        #region has id

        ///<summary>是否具有ID。</summary>
        public static bool GetHasID(DependencyObject obj) { return (bool)obj.GetValue(HasIDProperty); }
        public static void SetHasID(DependencyObject obj, bool value) { obj.SetValue(HasIDProperty, value); }
        public static readonly DependencyProperty HasIDProperty = DependencyProperty.RegisterAttached("HasID", typeof(bool), typeof(MindPanel), new PropertyMetadata(false));

        #endregion
    }
}
